package com.glsc.ngateway.opmanage.controller.feign;

import com.glsc.ngateway.common.api.oaflow.dto.OaRequestLogResp;
import com.glsc.ngateway.common.api.oaflow.feign.IFeignOaFlowService;
import com.glsc.ngateway.common.api.oaflow.resp.CommonResponse;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zzp
 * @date 2022/12/9
 * 自研流程调用接口
 */
@RequestMapping("/oaflow")
@Api(value = "自研Oaflow调用接口", tags = {"自研Oaflow调用接口"})
@RestController
public class OaflowFeignController {

    @Autowired
    private IFeignOaFlowService oaFlowService;

    @RequestMapping(method = RequestMethod.GET, value = "/getRequestLogList")
    public OaRequestLogResp getRequestLogList(@RequestParam("requestId") Integer requestId){
        CommonResponse<OaRequestLogResp> resp = oaFlowService.getRequestLogList(requestId, null);
        return resp.getData();
    }
}
